<?php
/**
 * <https://y.st./>
 * Copyright © 2018 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Lazy evaluation',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2018/12/29.jpg" alt="Houses beyond the fence" class="framed-centred-image" width="649" height="480"/>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			You phrased that very well.
			Parameters are only evaluated as needed when using lazy evaluation.
			It&apos;s an easy concept to understand, though at least for me, it&apos;s also very foreign.
			In essence, entire expressions are being passed as arguments, so those expressions only get evaluated as they need to be.
			In imperative programming though, the concept of passing an expression doesn&apos;t even make sense.
			The only things you can pass are either values or pointers, and pointers are basically just values that explain to the computer where in memory to find other values.
			Expressions cannot be passed in an imperative programming language, so those expressions are evaluated before passing the baton to the function, and the values gotten from the evaluation are what gets passed.
			With greedy evaluation, we can always discard values, but like you said, with lazy evaluation, we can discard entire expressions without even needing to convert them to hard values.
		</p>
	</blockquote>
</section>
END
);
